use std::collections::HashMap;

use serde::{Deserialize, Serialize};

use crate::common::{request, Response, HTTP_METHOD};

use crate::error::AppError;

#[derive(Debug, Serialize, Deserialize)]
pub struct Report {}

#[tauri::command]
pub fn get_report(
    api_url: &str,
    param: HashMap<String, String>,
) -> Result<Response<Report>, AppError> {
    let result = request::<Report>(HTTP_METHOD::GET, api_url, param)?;
    Ok(Response::new(200, String::from("成功"), result))
}
